"""
This file is part of GSBEdit. For copyright and licensing information, please
see gsbedit.py in the GSBEdit base directory.
"""


import ConfigParser
import os.path
import game_data.config_file as cf


class Package(cf.ConfigFile):
    def __init__(self, filename=None):
        cf.ConfigFile.__init__(self, filename)
    
    
    def create_sections(self):
        self.data.add_section('config')
            
        
    def get_version(self):
        if self.has_value('config', 'version'):
            return self.get_value('config', 'version')
        else:
            return None
        
    def __repr__(self):
        return "package.Package('%s')" % (self.filename)
    
    
    def __str__(self):
        return "Package<%s>" % self.get_name()
        